package com.hyl;

/**
 * @description:
 * @author: molar
 * @date: Created in 2020/6/14 12:15
 * @version:
 * @modified By:
 */
public class Cave {
    private String id;
    private String description;
    private Cave eastExit;
    private Cave southExit;
    private Cave westExit;
    private Cave northExit;

    public Cave() {
    }

    public Cave(String id, String description) {
        this.id = id;
        this.description = description;
    }

    public void setExits(Cave north, Cave east, Cave south, Cave west)
    {
        if (north != null)
            northExit = north;
        if (east != null)
            eastExit = east;
        if (south != null)
            southExit = south;
        if (west != null)
            westExit = west;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Cave getEastExit() {
        return eastExit;
    }

    public void setEastExit(Cave eastExit) {
        this.eastExit = eastExit;
    }

    public Cave getSouthExit() {
        return southExit;
    }

    public void setSouthExit(Cave southExit) {
        this.southExit = southExit;
    }

    public Cave getWestExit() {
        return westExit;
    }

    public void setWestExit(Cave westExit) {
        this.westExit = westExit;
    }

    public Cave getNorthExit() {
        return northExit;
    }

    public void setNorthExit(Cave northExit) {
        this.northExit = northExit;
    }
}
